const Router = require('koa-router')
const athletesRouter = new Router({ prefix: '/athletes' })
const { verifyAuth } = require('../middleware/authMiddleware')
const {
  getAthleteByUserId,
  getAthleteList,
  removeAthlete,
  updateAthlete,
  createAthlete
} = require('../controller/athletesController')

athletesRouter.get('/:id', verifyAuth, getAthleteByUserId)

athletesRouter.post('/',verifyAuth,createAthlete)

athletesRouter.post('/list', verifyAuth, getAthleteList)

athletesRouter.delete('/:id', verifyAuth, removeAthlete)

athletesRouter.patch('/:id', verifyAuth, updateAthlete)



module.exports = athletesRouter